package com.twu.biblioteca.domain;

public class Book implements LibraryItem {

    private final String id;
    private final String title;
    private final String author;

    public Book(String id, String title, String author) {
        this.id = id;
        this.title = title;
        this.author = author;
    }

    public String getId() {
        return id;
    }

    @Override
    public String getType() {
        return "book";
    }

    @Override
    public String getName() {
        return title;
    }

    @Override
    public String toString() {
        return String.format("[%s] %s - %s", id, title, author);
    }

}
